
#include "iostream"
#include "vector"
#include "unordered_map"
#include "unordered_set"
#include "algorithm"
#include "string"
#include "list"
#include "string.h"

class OneLoop{
public:
    std::vector<int> num;
    OneLoop(){
    }
    void run(int n){
        int m;
        std::cin>>m;
        for(int i=0;i<n;i++){
            for(int j=0;j<m;j++){
                printf("%c",'A'+ abs(j-i));
            }
            printf("\n");
        }
    }
};
class Solution {
public:
    void run() {

        bool first = true;
        int a;
        while (std::cin>>a) {
            OneLoop loop;
            loop.run(a);
        }
    }
};

int main() {
//    bool cur_num= true;
    Solution().run();
    return 0;
}

